//
//  WorkerSalaryPreView.swift
//  mggz
//
//  Created by 匀视网Mac on 2018/5/16.
//  Copyright © 2018年 爱丽丝的梦境. All rights reserved.
//

import UIKit

class WorkerSalaryPreView: UIView {

    
    @IBOutlet weak var companyLabel: UILabel!
    
    @IBOutlet weak var reasonLabel: UILabel!
    
    @IBOutlet weak var agreeButton: UIButton!
    
    @IBOutlet weak var appealButton: UIButton!
    
    @IBOutlet weak var realSalary: UILabel!
    
    @IBOutlet weak var protocolSalary: UILabel!
    
    var myFrame: CGRect?
    override init(frame: CGRect) {
        super.init(frame: frame)
        myFrame = frame
        self.setupSubviews()
    }
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        self.setupSubviews()
    }
    
    func setupSubviews() {
        let contentView = loadViewFromNib()
        addSubview(contentView)
    }
    func loadViewFromNib() -> UIView {
        let nib = UINib(nibName: "WorkerSalaryPreView", bundle: nil)
        let view = nib.instantiate(withOwner: self, options: nil).first as! UIView
        view.frame = myFrame!
        view.layer.cornerRadius = 6
        view.layer.shadowColor = UIColor.black.cgColor
        view.layer.shadowOpacity = 0.3
        view.layer.shadowOffset = CGSize(width: 1, height: 1)
        view.backgroundColor = UIColor.white
        return view
    }
    
    
    
}
